project(Path_Planning)

cmake_minimum_required (VERSION 3.5)

add_definitions(-std=c++11)

set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -Wall -ggdb")

set(sources src/astar.h
        src/track.cpp src/track.h
        src/trajectory_planner.cpp src/trajectory_planner.h
        src/trajectory_state.cpp src/trajectory_state.h
        src/discrete_prediction.cpp src/discrete_prediction.h
        src/discrete_trajectory_planner.cpp src/discrete_trajectory_planner.h
        src/controller.cpp src/controller.h
        src/spline.h src/json.hpp)

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
include_directories(/usr/local/include)
include_directories(/usr/local/opt/openssl/include)
link_directories(/usr/local/lib)
link_directories(/usr/local/opt/openssl/lib)
link_directories(/usr/local/Cellar/libuv/1.11.0/lib)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

add_executable(path_planning src/main.cpp ${sources})

target_link_libraries(path_planning z ssl uv uWS)
